{% extends "base_recording.html" %}

{% block title %}Recording :: List{% endblock %}

{% block body %}
<div id="apphead">
	<h2>Recording :: <em>List</em></h2>
</div>

<div id="projecthome" class="app">
	<table border="1" cellspacing="2" cellpadding="3" width="100%">
		<tr>
			<th>Title</th>
			<th>Artist</th>
			<th>Created</th>
			<th>UUID</th>			
			<th>Actions</th>
		</tr>
		{% for recording in recordings %}
			<tr class=" a">
				<td><a href="/recording/view?uuid={{ recording.uuid }}">{{ recording.title }}</a></td>
				<td>{{ recording.artist.name }}</td>
				<td>{{ recording.created|date:"Y-m-d H:i" }}</td>
				<td>{{ recording.uuid }}</td>
				<td>
					<a href="/recording/export?uuid={{ recording.uuid }}">export</a>
				</td>				
			</tr>
		{% endfor %}
	</table>
</div>
{% endblock %}								

		<form action="/recording/add" method="post" enctype="multipart/form-data">
			<table cellpadding="5" cellspacing="0" border="0">
				<tr>
					<td>Title</td>
					<td><input type="text" name="title"/></td>
				</tr>
				<tr>
					<td>Artist</td>
					<td>
						<select name="artist">
							{% for artist in artists %}
								<option value="{{ artist.uuid }}">{{ artist.name }}</option>
							{% endfor %}
						</select>
					</td>
				</tr>
				<tr>
					<td>Year</td>
					<td><input type="text" name="year"/></td>
				</tr>
				<tr>
					<td>Type</td>
					<td>
						<select name="type">
							<option value="bootleg">Bootleg</option>
							<option value="studio">Studio</option>
							<option value="live">Live</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>Cover</td>
					<td><input type="file" name="cover"/></td>
				</tr>
				<tr>
					<td>Description</td>
					<td><textarea name="description"></textarea></td>
				</tr>
			</table>

			<p><input type="submit" value="Add Disc"></p>

		</form>

